package com.app.util;


// 因为每次必须new出来因此不用更新 start;
public abstract class TIME_HIGHT
{
	
	long start ;
	
	
	public TIME_HIGHT(){
		start = System.nanoTime();
	}
	
	
	public	double get_elapsed_time(){
	
		String str_header = give_msg(); 
		fuc();
		
		long current = System.nanoTime();
		long delta = current - start;
		
		double t_miscro_s = (delta) / 1000;
		double t_ms = t_miscro_s / 1000; //double t_ms = (t_m) / (1000*1000);   
		double t_s = (t_ms) / 1000; 
		
		System.out.println(str_header+"----"+t_s+"s"+"----"+t_ms+"ms"+"----"+t_miscro_s+"微秒");
		
		return t_ms;
	}
	
	
	public String give_msg(){
		return "";
	}
	
	
	public abstract void fuc();
	
	
	
}